<script setup lang="ts">
import router from "@/router";
import {useUserStore} from "@/stores/modules/useUserStore";

router.beforeEach(async (to, from) => {
  if (useUserStore.token === '' && to.name !== 'Login') {
    return {name: 'Login'}
  }
})
</script>
<template>

  <router-view></router-view>
</template>

<style lang="scss">
html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}
</style>
